﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Index/Index_One.master" AutoEventWireup="true" CodeFile="SelectGauge.aspx.cs" Inherits="Index_Gauge_SelectGauge" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    康复评估
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Info" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Map" runat="Server">
    <a href="../Main.aspx">首页</a>
    <span>></span>
    <a href="#">康复评估</a>
    <span>></span>
    <a href="../MedicalRecord/MedicalRecordEdit.aspx?Action=Add">新增</a>
    <span>></span>
    <a href="../MedicalRecord/MedicalRecordEdit.aspx?Action=Detail&MedicalRecordId=<%=MedicalRecordId %>">个人信息确认</a>
    <span>></span>
    <a href="SelectGaugeType.aspx?MedicalRecordId=<%=MedicalRecordId %>">评估表分类</a>
    <span>></span>
    <span>功能障碍</span>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Tool" runat="Server">
    <a href="SelectGaugeType.aspx?MedicalRecordId=<%=MedicalRecordId %>" class="ui-btn2">评估表分类</a>
    <a href="GaugeConfirm.aspx?MedicalRecordId=<%=MedicalRecordId %>" class="ui-btn2-gray">评估表汇总</a>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Main_Title" runat="Server">
    功能障碍
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Main" runat="Server">
    <asp:Repeater ID="rpt_List" runat="server" OnItemCommand="rpt_List_ItemCommand" OnItemDataBound="rpt_List_ItemDataBound">
        <HeaderTemplate>
            <div class="ui-select-list">
                <ul id="ul-list">
        </HeaderTemplate>
        <ItemTemplate>
            <li>
                <asp:CheckBox ID="cb_Select" runat="server" style="display:none"/>
                <asp:HiddenField ID="hf_GaugeId" runat="server" Value='<%#Eval("GaugeId") %>' />
                <asp:HiddenField ID="hf_Title" runat="server" Value='<%#Eval("Title") %>' />
                <a href="javascript:;" onclick="selectGaugeCheckBox(this)"><%#Eval("Title") %></a>
            </li>
        </ItemTemplate>
        <FooterTemplate>
            </ul>
            </div>
        </FooterTemplate>
    </asp:Repeater>

    <div class="ht-pager">
        <webdiyer:AspNetPager ID="PaginateCtl" runat="server" OnPageChanged="PaginateCtl_PageChanged" />
    </div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Footer" runat="Server">

    <p style="text-align: right">
        <asp:Button ID="btn_Submit" runat="server" Text="确认" CssClass="ui-btn" OnClick="btn_Submit_Click" />
    </p>

    <script type="text/javascript">
        function selectGaugeCheckBox(obj) {
            var $li = $(obj).parent();
            var $cb_select = $li.find('input[type=checkbox]');
            if ($cb_select.attr('checked') == 'checked') {
                $cb_select.removeAttr('checked');
            } else {
                $cb_select.attr('checked', 'checked');
            }
            $li.addClass('Selected');
        }
        $(function () {
            $('#ul-list li input[type=checkbox]').each(function () {
                if ($(this).attr('checked') == 'checked') {
                    $(this).parent().addClass('Selected');
                }
            });
        });
    </script>
</asp:Content>

